package com.deyuanyun.pic.insp.service.inspresult.impl;

import com.deyuanyun.pic.common.tool.JXL;
import com.deyuanyun.pic.insp.mapper.InspDefectCrossMapper;
import com.deyuanyun.pic.insp.service.inspresult.InspDefectCrossService;
import com.deyuanyun.pic.settings.support.biz.CodeUtil;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;

/*偏心套管Service  李成祥  15年10月17日下午14:10*/


@Service
public class InspDefectCrossServiceImpl extends BaseServiceImpl implements InspDefectCrossService {

	@Resource
	private InspDefectCrossMapper inspdefectcrossservice;

	@Override
	public Page<LinkedHashMap<String, Object>> findPage(HashMap param) {
		handlerParam(param);
		initPage();
		Page<LinkedHashMap<String, Object>> data=inspdefectcrossservice.findPage(param);
		for(LinkedHashMap<String, Object> map:data)
		{
			map.put("REPAIR_SUGGESTION", CodeUtil.getName((String) map.get("REPAIR_SUGGESTION")));
		}
		return data;
	}

	@Override
	public Page<HashMap<String, Object>> getMain(HashMap<String, Object> map) {
		handlerParam(map);
		initPage();
		Page<HashMap<String,Object>>  data=inspdefectcrossservice.getMain(map);
		handlCeharacteristic(data,map);
		return data ;
	}

	@Override
	public Page<HashMap<String, Object>> getStatistics(HashMap<String, Object> map) {
		// TODO Auto-generated method stub
		return inspdefectcrossservice.getStatistics(map);
	}

	@Override
	public List queryExport(HashMap<String, Object> map) {

		handlerParam(map);
		List<LinkedHashMap<String,Object>> data=inspdefectcrossservice.queryExport(map);
		return data;
	}


}
